package com.xueyi.system.material.domain.po;

import cn.hutool.json.JSONArray;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.xueyi.common.core.web.tenant.base.TBaseEntity;
import com.xueyi.system.material.domain.dto.MaterialDto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.xueyi.common.core.annotation.Excel;

import java.math.BigDecimal;

/**
 * 投入品库 持久化对象
 *
 * @author yanhe
 */
@TableName(value = "base_material", excludeProperty = {"sort"},autoResultMap = true)
public class MaterialPo extends TBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 编码
     */
    @Excel(name = "编码")
    @TableField("code")
    private String code;


    /**
     * 类型
     */
    @Excel(name = "类型")
    @TableField("type")
    private String type;

    /**
     * 图片
     */
    @Excel(name = "图片")
    @TableField(value = "img", typeHandler = FastjsonTypeHandler.class)
    private JSONArray img;

    /**
     * 规格
     */
    @Excel(name = "规格")
    @TableField("specification")
    private String specification;

    /**
     * 产地
     */
    @Excel(name = "产地")
    @TableField("address")
    private String address;

    /**
     * 保质期
     */
    @Excel(name = "保质期")
    @TableField("expiration")
    private String expiration;

    /**
     * 单位
     */
    @Excel(name = "单位")
    @TableField("unit")
    private String unit;

    /**
     * 供应商信息
     */
    @TableField("supplier_id")
    private Long supplierId;

    /**
     * 供应商名称
     */
    @Excel(name = "供应商名称")
    @TableField("supplier_name")
    private String supplierName;

    /**
     * 当前库存
     */
    @Excel(name = "当前库存")
    @TableField("current_inventory")
    private BigDecimal quantity;

    /**
     * 附件
     */

    @TableField("appendix")
    private String appendix;

    /**
     * 状态：1正常 2停用
     */
    @Excel(name = "状态：1正常 2停用")
    @TableField("status")
    private String status;

    @TableField(exist = false)
    private BigDecimal entryQuantity;

    @TableField(exist = false)
    private BigDecimal outQuantity;

    @TableField(exist = false)
    private BigDecimal desQuantity;


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getEntryQuantity() {
        return entryQuantity;
    }

    public void setEntryQuantity(BigDecimal entryQuantity) {
        this.entryQuantity = entryQuantity;
    }

    public BigDecimal getOutQuantity() {
        return outQuantity;
    }

    public void setOutQuantity(BigDecimal outQuantity) {
        this.outQuantity = outQuantity;
    }

    public BigDecimal getDesQuantity() {
        return desQuantity;
    }

    public void setDesQuantity(BigDecimal desQuantity) {
        this.desQuantity = desQuantity;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }


    public void setType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public JSONArray getImg() {
        return img;
    }

    public void setImg(JSONArray img) {
        this.img = img;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public String getSpecification() {
        return specification;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAddress() {
        return address;
    }

    public void setExpiration(String expiration) {
        this.expiration = expiration;
    }

    public String getExpiration() {
        return expiration;
    }

    public void setAppendix(String appendix) {
        this.appendix = appendix;
    }

    public String getAppendix() {
        return appendix;
    }

    @Override
    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String getStatus() {
        return status;
    }

}
